#ifndef RECONSTRUCTION_HPP
#define RECONSTRUCTION_HPP

#include "typeAliases.hpp"
#include "macros.hpp"
#include "field.hpp"
#include "reconstruction_types.hpp"

namespace hms::reconstruction 
{

template<typename SolverType, typename A, typename B>
void firstOrder(
	A& d,
	A& z,
	A& h,
	Ref<Array2Xs> v,
	const B& dCell,
	const B& zCell,
	const Ref<const Array2Xs>& vCell
);

template<typename SolverType>
void firstOrder(
	EdgeValues& ev,
	const RowArray2s& dCell,
	const RowArray2s& zCell,
	const ArrayNNs<2,2>& vCell
);

template<typename SolverType, typename A, typename B>
void firstOrder(
	EdgesValues& ev,
	const Pair<A>& dCellLR,
	const Pair<A>& zCellLR,
	const Pair<B>& vCellLR
);

template<typename SolverType, typename ES, typename EV, typename CS, typename CV>
void central(
	ES& dLR,
	ES& zLR,
	ES& hLR,
	EV& vLR,
	const CS& dCell,
	const CS& hCell,
	const CV& qCell
);

template<typename SolverType, typename EV, typename CS, typename CV>
void central(
	EV& ev,
	const CS& dCell,
	const CS& hCell,
	const CV& qCell
);

template<typename R, typename LR_r, typename Dx>
void setSmoothnessMonitor(
	R& rLR,
	const LR_r& phiCellLR,
	const LR_r& phiCellLLRR,
	const Dx& dxQuotientL,
	const Dx& dxQuotientR
);

template<typename LimiterVals, typename SmoothnessMonitor>
void setSlopeLimiter(
	LimiterVals& psi,
	const SmoothnessMonitor& r,
	const LimiterFunction& limFunc
);

template<typename LR_w, typename LR_r, typename Dx>
void musclScheme(
	LR_w& phiLR,
	LR_w& psiLR,
	const LR_r& phiCellLR,
	const LR_r& phiCellLLRR,
	const Dx& dxQuotientL,
	const Dx& dxQuotientR,
	const LimiterFunction& limFunc
);


template<typename SolverType,
	typename EV,
	typename LR_r1, typename LR_r2,
	typename Dx>
void highOrder(
	EV& ev,
	const LR_r1& dCellLR,
	const LR_r1& dCellLLRR,
	const LR_r1& hCellLR,
	const LR_r1& hCellLLRR,
	const LR_r2& qCellLR,
	const LR_r2& qCellLLRR,
	const Dx& dxL,
	const Dx& dxR,
	const LimiterFunction& limFunc
);

template<typename EV>
void hydrostatic_firstOrder( EV& ev );

} // end namespace hms::reconstruction

#include "reconstruction.tpp"

#endif

